/* ******************************************************************
 * This file is part of the escal project and distributed under the
 * terms of the GNU General Public License Version 3
 * Copyright (C) 2008 Epocher (xijiaosdq@gmail.com)
 * See COPYING file for licensing information.
 *******************************************************************/

#include "escal.h"
#include "escal_settings.h"
#include "log_manager.h"
#include "escal_gui.h"
#include "task.h"
#include "task_model.h"
#include "initializer.h"
#include <QDir>
#include <QApplication>
#include <QtGui>
#include <QtNetwork>

namespace Escal{
	QString 	binaryFilePath;
	QString 	escalHome;
	QString 	dataHome;
	QDir 		*homeDir;
	QDir		*dataDir;
	EscalSettings 	*settings;
	Initializer 	*eInit;
	LogManager 	*logManager;
}

using namespace Escal;
int main(int argc, char *argv[])
{
	binaryFilePath = QByteArray(argv[0]);
	QApplication app(argc, argv);
	Initializer init;
	init.initDaemon(argc, argv);
	init.initFolders(argc, argv);
	init.initSettings();
	init.initRuntime();
	EscalGui window;
	//init->initDbus(argc, argv);
	window.show();
	return app.exec();
}
